#include "HeadFiles.h"

Factory* Factory::instance = nullptr;
Factory::Factory()
{
}


Factory::~Factory()
{
}

BaseWindow * Factory::FCreateWindow(WindowType type)
{
	if (type == Start_Window) {
		return new StartWindow();
	}
	else if (type == Village_Window) {
		return new VillageWindow();
	}
	else if (type == Field_Window) {
		return new FieldWindow();
	}
	else if (type == End_Window) {
		return new FieldWindow();
	}
	else
		return new StartWindow();
}

Factory * Factory::Instance()
{
	if (instance == nullptr)
	{
		instance = new Factory;
	}
	return instance;
}
